package cn.bgs.controller;

import cn.bgs.pojo.VisitorsRecord;
import cn.bgs.service.IVisitorsRecordService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("sfangke")
@RestController
public class FangkeController {
    @Autowired
    private IVisitorsRecordService iVisitorsRecordService;

    @RequestMapping("findAll")
    public List<VisitorsRecord> findAll(@Param("id")Integer id, @Param("zhuangtai") String zhuangtai, @Param("name") String name){
        return  iVisitorsRecordService.findAll(id,zhuangtai,name);
    }

    @RequestMapping("findById")
    public List<VisitorsRecord> findById(Integer id){
        return iVisitorsRecordService.findById(id);
    }
}
